<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
/* @var $this \Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts */
?>
<script type="text/x-jquery-tmpl" id="group-product-template">
<tr title="#" class="pointer" data-role="row">
    <td data-column="info" class="col-draggable col-info">
        <span class="draggable-handle"></span>
        <input type="hidden" name="links[associated][${id}][id]" value="${id}" data-role="id" />
        <input type="hidden" name="links[associated][${id}][position]" value="${position}" data-role="position" />
    </td>
    <td data-column="name" class="editable col-name">
        ${name}
    </td>
    <td data-column="sku" class="col-sku">
        ${sku}
    </td>
    <td data-column="price" class="col-price">
        ${price}
    </td>
    <td data-column="qty" class="editable col-qty col-number">
        <input type="text" class="input-text " name="links[associated][${id}][qty]" value="${qty}">
    </td>
    <td data-column="actions" class="col-actions">
        <button type="button" class="action- delete" data-role="delete"></button>
    </td>
</tr>
</script>
<div class="grid-container" class="no-display">
    <table class="data-table" data-role="grouped-product-grid"
        data-products="<?php echo $this->escapeHtml($this->helper('Magento\Core\Helper\Data')->jsonEncode(
                $this->getAssociatedProducts()
        )); ?>">
        <thead>
            <tr class="headings">
                <th data-column="info" class="col-draggable no-link col-info">
                    <span></span>
                </th>
                <th data-column="name" class="no-link col-name">
                    <span><?php echo __('Name') ?></span>
                </th>
                <th data-column="sku" class="no-link col-sku">
                    <span><?php echo __('SKU') ?></span>
                </th>
                <th data-column="price" class="no-link col-price">
                    <span><?php echo __('Price') ?></span>
                    </th>
                <th data-column="qty" class="no-link col-qty">
                    <span><?php echo __('Default Qty') ?></span>
                </th>
                <th data-column="actions" class="last no-link col-actions">
                    <span></span>
                </th>
            </tr>
        </thead>
        <tbody></tbody>
    </table>
</div>
